<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增客户成交')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-deal-add">

            <div class="form-group">
                <label class="col-sm-3 control-label">客户：</label>
                <div class="col-sm-8">
                    <!--<input name="jumpIdArticle" class="form-control" type="text">-->
                    <select id="customerId" name="customerId" class="form-control m-b" >
                        <option value="">请选择客户</option>
                        <option th:each="dict : ${customerList}" th:text="${dict.name}+'-'+${dict.mobile}"
                                th:value="${dict.id}" required></option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">房源：</label>
                <div class="col-sm-8">
                    <!--<input name="jumpIdArticle" class="form-control" type="text">-->
                    <select id="houseId" name="houseId" class="form-control m-b" >
                        <option value="">请选择房源</option>
                        <option th:each="dict : ${houseList}" th:text="${dict.name}"
                                th:value="${dict.id}" required></option>
                    </select>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">交易时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="created" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">经理：</label>
                <div class="col-sm-8">
                    <input name="manager" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">实际收佣金额：</label>
                <div class="col-sm-8">
                    <input name="price" class="form-control" type="text">
                    <font color="red" class="pull-left mt10">
                        提示：此佣金用以返利,如果是独家房源,会给添加人返利!
                    </font>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <script type="text/javascript">
        var prefix = ctx + "system/customer/deal"
        $("#form-deal-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-deal-add').serialize());
            }
        }

        $("input[name='created']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>